#pragma once

#include "Containers/Containers.h"
#include "ScriptCompiler/AST/ASTNode.h"

class CTypeNode;
class CScriptToken;
class CAccessLevelNode;
class CParameterNode;
class CSentenceBlockNode;
class CExpressionNode;
class CDecoratorNode;
class CFunctionContentNode;

class CFunctionNode : public CASTNode
{
public:
    CFunctionNode(std::weak_ptr<CScriptFileContext> InFile)
        : CASTNode( InFile,EASTNodeType::Function)
    {
    }

    //name 
    TOptional<std::shared_ptr<CAccessLevelNode>> AccessLevel;
    
    TOptional<std::shared_ptr<CDecoratorNode>> Decorator;

    std::shared_ptr<CTypeNode> ReturnType;
    
    std::shared_ptr<CScriptToken> Name;

    TVector<std::shared_ptr<CParameterNode>> Parameters;

    TOptional<std::shared_ptr<CFunctionContentNode>> Content;

    virtual void DebugPrint(int32_t InDepth) override;
    
    virtual std::shared_ptr<CScriptToken> GetFirstToken() override;
};